package com.liang.subject.infra.basic.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liang.subject.infra.basic.entity.SubjectInfo;
import com.liang.subject.infra.basic.service.SubjectInfoService;
import com.liang.subject.infra.basic.mapper.SubjectInfoMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * @author 29018
 * @description 针对表【subject_info(题目信息表)】的数据库操作Service实现
 * @createDate 2024-10-12 15:22:34
 */
@Service
@RequiredArgsConstructor
public class SubjectInfoServiceImpl extends ServiceImpl<SubjectInfoMapper, SubjectInfo> implements SubjectInfoService {

    private final SubjectInfoMapper subjectInfoMapper;

    @Override
    public Page<SubjectInfo> querySubjectList(Page<SubjectInfo> page, SubjectInfo subjectInfo, Long categoryId, Long labelId) {
        return subjectInfoMapper.querySubjectList(page, subjectInfo, categoryId, labelId);
    }

    @Override
    public List<SubjectInfo> getContributeList() {
        return subjectInfoMapper.getContributeList();
    }

    @Override
    public Long querySubjectIdCursor(Long subjectId, Long categoryId, Long labelId, int cursor) {
        return subjectInfoMapper.querySubjectIdCursor(subjectId, categoryId, labelId, cursor);
    }
}




